<?php
$name = $_GET['name'];
$info = pathinfo($name);
$im = file_get_contents('C:/xampp/htdocs/'.$name);
header('content-type: image/'.$info['extension']);
echo $im;
?>